<?php
class Kanedo_Registry
{
	static private $_instance = null;
	
	private $registeredObjects = array();
	
	private function __construct()
	{
		
	}
	public static function getInstance()
	{
		if (self::$_instance === null)
		{
			self::$_instance = new Kanedo_Registry();
		}
		return self::$_instance;
	}
	
	public function __set($key, $obj)
	{
		$this->registeredObjects[$key] = $obj;
	}
	
	public function __get($key) 
	{
		if(key_exists($key, $this->registeredObjects)) {
			return $this->registeredObjects[$key];
		}else {
			return false;
		}
	}
}
?>